package core.plugins;

/**
 * This is the interface to define the functions a plugin to
 * identify a product should have.
 * @author Spencer
 *
 */

public interface IProductIDPlugin 
{
	/**
	 * This method will identify which product the 
	 * passed in barcode is associated with. This 
	 * interface should also be associated with the 
	 * chain of responsibility. So if this plugin
	 * is unable to identify the product then it 
	 * should call the next plugin in the chain
	 * and ask it for the answer.  
	 * 
	 * @param barcode The String representing the barcode of the product.
	 * @return This returns a string containing the description of the
	 * 		Product.  If the product is not found null will be returned.
	 */
	public String idProduct(String barcode);
	
	/**
	 * This method will set the next product in the 
	 * product chain.  Your concrete class should 
	 * save the passed in value of this method.
	 * 
	 * @param nextPlugin The plugin that is next in the chain of 
	 * 		responsibility.
	 */
	public void setNextPlugin(IProductIDPlugin nextPlugin);
	
	/**
	 * This will return the next plugin in the chain
	 * of responsibility.
	 * 
	 * @return The next plugin in the chain of command.
	 */
	public IProductIDPlugin getNextPlugin();
}
